Repository navigation
docs(skills): the ask skill teaches withheldFields, the database top-N cut and totalGroups - #35268
Conversation
…N cut and totalGroups Step 4 says a field named in withheldFields exists but is hidden from the caller (never empty) and how to ask aggregate_records for a top or bottom N. One shared truncated bullet in step 6 answers "how many" from totalGroups for query_dataset and aggregate_records, and says the total is unknown without it; the two per-tool truncated sentences it replaces are cut. Two eval cases pin the new teaching. The ratchet row moves by the measured remainder. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CazXu8zyYD5PC6J2u7
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 12 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin a19faa0327db713561ae56c30b63bf2dc8761a72 && git checkout a19faa0327db713561ae56c30b63bf2dc8761a72
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin d6d96450568965867c50ef6c306657f0bf7e9bf0 f7e199c44de17985794c5b58f7204a4aa43d8402 && git checkout -B drift-repro d6d96450568965867c50ef6c306657f0bf7e9bf0 && git merge --no-ff f7e199c44de17985794c5b58f7204a4aa43d8402
node scripts/docs-audit/affected-docs.mjs --json d6d96450568965867c50ef6c306657f0bf7e9bf0 |
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ Contract reviewServed-tier: PR #35268 (draft, The security line above is a meant yes, not the template's default. The step-4 ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgment
Findings: one must-fix (M1), no should-fix, four nits (N1 to N4). M1 keeps this head from landing; the delta returns to this reviewer. Implemented-by: VERDICT: FAIL |
…al to query_dataset Contract review M1: the shared step-6 bullet told the agent the total is unknown on a capped query_records page, which states its own total. It now cites totalGroups as the pre-cut count and says the total is unknown only for a query_dataset answer without it. Eval assertions tightened; two cases pin the totalGroups arm and a capped query_records page. Ratchet row re-measured, 1873 -> 1877. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Utp6CazXu8zyYD5PC6J2u7
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ Contract reviewServed-tier: Delta round on PR #35268, after record 6997032414 (FAIL at The security line is a meant yes, for the first record's reason: the step-4 ① Derived judgments
② Semver levelUnchanged: ③ Boundary flags
④ Design judgment
Nits at this head, none affecting correctness or the contract:
Findings: no must-fix, no should-fix. M1, N1, N2 and N3 of record 6997032414 are closed; N4 was recorded as no action. This is the final round for this head. Landing still waits for the Tier H approval. Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CbUb7TcZK1XUAddUmQ 维护者速读
席位核对 — ACCEPT · repo:objectstack#5 · head
|
Requested by Bill · project thread
Fixes #35191
Fixes #35203
Clause-②: no
Metadata-protocol: none
维护者速读
objectstack-ask多教三件事:字段被字段级权限隐藏(withheldFields)时说「你看不到」而不是「为空」;排名(前 N / 后 N)让数据库用orderBy+limit排好再截;结果被截断时引用totalGroups作为截断前一共多少组;query_dataset没有totalGroups时说总数未知(query_records分页自带total,不受影响)。withheldFields、totalGroups和数据库排名截断,但技能还没教,模型可能把隐藏字段说成空值,或把返回的行数当成总数。GET /mcp/skill页面,不改任何代码路径;回滚即 revert 本 PR。技能 token 天花板 1779 → 1877(+98),按常设裁决先删重复、余额按实测提高。skills/objectstack-ask/SKILL.md(第 4 步两条新句、第 6 步合并后的truncated句);scripts/check-skills-token-ratchet.mjs的 ask 行注释;skills/objectstack-ask/evals/metric-selection-fallback.json新增的 12、13 两例。node scripts/check-skills-token-ratchet.mjs && node scripts/gen-mcp-ask-skill.mjs --check,预期 ask 行1877 / 1877且生成模块 current。packages/mcp生成模块,属 Tier H:需授权账号 APPROVED 审核,之后由席位落地。What changes
skills/objectstack-ask/SKILL.md, andpackages/mcp/src/ask-skill.generated.tsregenerated from it:withheldFields(Ask skill: teach withheldFields and top-N aggregate (orderBy, limit, totalGroups) #35191, line 1, card wording verbatim): "withheldFieldson aquery_recordsorget_recordanswer names fields that exist but are hidden from you: say they are not visible to you, never that they are empty." It stays inside mcp: query_records and get_record say which fields field-level security withheld, so an answer says "not visible to you", not "blank" #35137's ruling A (comment 6977609191): the bullet speaks only of a field the answer names, and the server names only a field the caller's own served schema shows.orderBy(an aggregation alias or a group key) andlimit: N, so the database ranks and cuts the groups." The card's closing clause ("citetotalGroupsas how many groups existed before the cut") moved, in those words, into the shared sentence below, as objectstack-ask skill: teach query_dataset's totalGroups next to truncated #35203 asks ("use one shared sentence for both").truncatedbullet (objectstack-ask skill: teach query_dataset's totalGroups next to truncated #35203): "truncated: true: more rows or groups existed than came back; say the result is partial, and citetotalGroupsas how many groups existed before the cut. Without it, say aquery_datasettotal is unknown, notrowCount." Source text: scope note 6982266158 and thetotalGroupsdescribe inpackages/spec/src/ai/dataset-tools.zod.ts(present on both the pushed-down and the in-memory window, absent only where the count is not provable). It coversquery_datasetandaggregate_recordsin one place, because step 6 is read on both the governed path (step 3) and the fallback (step 4). "Unknown" is scoped toquery_dataset:aggregate_recordsalways answerstotalGroups, and a cappedquery_recordspage orget_recordrelated list states its owntotal(contract review 6997032414, M1).truncated: true: more rows existed than came back. Say the result is partial." and step 4's "truncated: trueon its answer means groups were cut off: say so." Step 3 keeps itswarningsentence.skills/objectstack-ask/evals/metric-selection-fallback.json: Add comprehensive test suite for Zod schema validation #12 (aquery_recordsanswer withwithheldFields: ['probability']→ "not visible", never "is empty" or "is blank"), [WIP] Add Chinese version of the documentation #13 (a top-5query_datasetanswer withtruncated: trueand nototalGroups→ "partial", total "unknown", never 5), feat: Comprehensive CRM example demonstrating all ObjectStack protocol features #14 (anaggregate_recordstop-3 withtotalGroups: 41→ cites 41, never "unknown") and Add missing Field.phone() helper and factory methods for Action/Dashboard/Report #15 (a cappedquery_recordspage withtotal: 240→ says 240, never "unknown"). Evals are unpriced by the ratchet (ruling record 6513306068, part 1).skills/objectstack-ask/SKILL.mdrow moves 1779 → 1873 → 1877, each measurement written into its note. The raise path is the standing maintainer ruling 「A:先削重复,余额按实测提高」 (2026-10-27), which ruling record 6513306068 (letter B) made the gate-recognised path: the restatements above are cut in the same file first (-151 bytes), and the row moves by the measured remainder only. Text net +377 bytes: 7135 → 7512, less the 20-byte stamp line,ceil(7492 / 4)= 1873 (+94); the M1 fix then took the step-6 bullet from 215 to 230 bytes: 7512 → 7527,ceil(7507 / 4)= 1877 (+4). Pinned AT the measurement with zero headroom. No other row moves..changeset/35191-ask-skill-withheld-totalgroups.md,patchon@objectstack/skillsand@objectstack/mcp(the generated module ships in@objectstack/mcp).content/docs/ai/skills-reference.mdxandskills/README.mdwere regenerated (gen:skill-docs) and came out byte-identical: they render the frontmatter only, which is unchanged.Skills size readings (
skills/**touched)origin/maine8a78c4)skills/objectstack-ask/SKILL.mdlinesskills/objectstack-ask/SKILL.mdratchet tokensskills/*/SKILL.md, linesskills/*/SKILL.md, bytesNo re-wrap is counted as payment: the one re-flowed line (step 3's
warningsentence, now on one line) moves 2 bytes and is inside the net figure.Tests
Ask-skill single source and the mcp package
pnpm --filter @objectstack/mcp exec vitest run --maxWorkers=2 src/skill-single-source-34686.test.ts→Tests 3 passed (3)(the generated module and the served/mcp/skillsection equal the skill's data loop).pnpm --filter @objectstack/mcp exec vitest run --maxWorkers=2→Test Files 77 passed (77),Tests 1400 passed (1400).pnpm --filter @objectstack/mcp typecheck→ exit 0;check:test-typecheck: OK.pnpm --workspace-concurrency=2 --filter '@objectstack/mcp...' build→ lockVERDICT command-exit 0.f7e199c4with the same results (one lock run,VERDICT command-exit 0).No ablation: the diff changes served text and a ratchet row, no tested behaviour.
Acceptance notes
truncated: trueand true on all four answers that carry it. Its count half reaches only the analytics answers: it citestotalGroupswhere the answer has one, and says the total is unknown only for aquery_datasetanswer without it. A cappedquery_recordspage and aget_recordrelated list carry nototalGroupsand state their owntotal, which the bullet leaves alone (eval Add missing Field.phone() helper and factory methods for Action/Dashboard/Report #15 pins it).Verification
Local gate subset (dispatch-gates --commands, narrowed to this diff)
Derived by
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstackat ef142a1 and again at f7e199c (the same 88 commands); the readings below are from f7e199c. 85 exit 0, includingnode scripts/check-skills-token-ratchet.mjs(skills/objectstack-ask/SKILL.md is 1877 tokens (ceiling 1877; headroom 0)),pnpm --filter @objectstack/spec run check:skill-docs,pnpm check:nul-bytes,pnpm check:doc-authoring,node scripts/check-adr-0087-registration.mjs --base origin/main,node scripts/check-empty-changeset.mjs --base origin/main.node scripts/gen-mcp-ask-skill.mjs --check→ current.NOT MEASURED locally (exit 3, PREREQUISITE NOT MET, CI runs them):
node scripts/check-plugin-teardown-shape.mjs --self-test(shallow clone cannot reach its pinned fixture commit) andpnpm check:dual-build-cjs-loads(needs every package'sdist/; only the mcp closure was built).pnpm check:pm-dispatch-gates(run outside the 88 above, in the background with a foreground wait):✓ dispatch-gates self-test (fast tier): 2249 cases pass, exit 0.Reconciliation:
node scripts/pm/dispatch-gates.mjs --ranwith exit codes recorded →88 derived famil(ies) accounted for — 86 run, 2 NOT-MEASURED (2 DERIVED from a recorded exit 3).The gate union ran on head
f7e199c4.🤖 Generated with Claude Code
https://claude.ai/code/session_01Utp6CazXu8zyYD5PC6J2u7